﻿function LoveIn(i) {
    var html = $.ajax({
        url: "/ajax/image.aspx?type=love&id=" + i + "&rd=" + Math.random(),
        async: false
    }).responseText;
    if (html == "1") {
        alert("添加成功。");
    }
    else {
        alert("请求失败，请稍后重试！");
    }
}
function Shou(i) {
    var html = $.trim($.ajax({
        url: "/ajax/image.aspx?type=shou&id=" + i + "&rd=" + Math.random(),
        async: false
    }).responseText);
    if (html == "") {
        //alert("请登录");
        shologin();
    }
    else if (html == "1") {
        alert("添加成功。");
    }
    else {
        alert("请求失败，请稍后重试！");
    }
}
function Jubao() {
    var url = escape(document.location.href);
    var html = $.trim($.ajax({
        url: "/ajax/image.aspx?type=jubao&url=" + url + "&rd=" + Math.random(),
        async: false
    }).responseText);
    if (html == "") {
        shologin();
    }
    else if (html == "1") {
        alert("举报成功。");
    }
    else {
        alert("请求失败，请稍后重试！");
    }
}
function shologin() {
    $("#loginBox").trigger("click")
}
function loginout() {
    var html = $.trim($.ajax({
        url: "/user/loginout.aspx&rd=" + Math.random(),
        async: false
    }).responseText);
    window.location.href = window.location.href;
}